package hu.tortavar2.client.activity;

import hu.tortavar2.client.ClientFactory;
import hu.tortavar2.client.SiteService;
import hu.tortavar2.client.SiteServiceAsync;
import hu.tortavar2.client.place.WelcomePlace;
import hu.tortavar2.client.view.layout.WelcomeView;
import hu.tortavar2.client.view.layout.WelcomeViewImpl;

import java.util.logging.Logger;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.Document;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.AcceptsOneWidget;

public class WelcomeActivity extends AbstractActivity implements WelcomeView.Presenter{

	private final Logger log = Logger.getLogger(WelcomeActivity.class.getName());
	SiteServiceAsync siteService = GWT.create(SiteService.class);
	
	private final WelcomeView view;
	private final PlaceController placeController;
	
	public WelcomeActivity(ClientFactory clientFactory) {
		
		view = new WelcomeViewImpl();
		placeController = clientFactory.getPlaceController();
	}
	
	@Override
	public void start(AcceptsOneWidget panel, EventBus eventBus) {
		view.setPresenter(this);
		panel.setWidget(view.asWidget());
	}

	@Override
	public void goTo(Place place) {
		// TODO Auto-generated method stub
		
	}
}
